/*Arquivo responsável pelos efeitos do menu*/

var clicked_esri = false;
var clicked_opl = false;


function verificarEstadoMenu(origem) {
    if(origem == 1) {
        if (!clicked_esri && clicked_opl) {
        $("#logo_esri").css("border-color", "red");
        $("#logo_opl").css("border-color", "black");
        clicked_esri = true;
        clicked_opl = false;
        $("#menu_opl").hide("slide", {direction: 'left'}, 700);
        $("#menu_esri").show("slide", {direction: 'left'}, 700);
       

    } else if (clicked_esri && !clicked_opl) {
        $("#logo_esri").css("border-color", "black");
        clicked_esri = false;
         $("#menu_esri").hide("slide", {direction: 'left'}, 700);
    }
    else if (!clicked_esri && !clicked_opl) {
            $("#logo_esri").css("border-color", "red");
            clicked_esri = true;
             $("#menu_esri").show("slide", {direction: 'left'}, 700);
        } 
    }
    else if(origem ==2) {
         if (!clicked_esri && clicked_opl) {
        $("#logo_opl").css("border-color", "black");
        $("#menu_opl").hide("slide", {direction: 'left'}, 700);
        clicked_opl = false;

    } else if (clicked_esri && !clicked_opl) {
        $("#logo_esri").css("border-color", "black");
        $("#logo_opl").css("border-color", "red");
        clicked_esri = false;
        clicked_opl = true;
        $("#menu_esri").hide("slide", {direction: 'left'}, 700);
        $("#menu_opl").show("slide", {direction: 'left'}, 700);
    }
    else if (!clicked_esri && !clicked_opl) {
            $("#logo_opl").css("border-color", "red");
            clicked_opl = true;
            $("#menu_opl").show("slide", {direction: 'left'}, 700);
        } 
        
    }
    
}

function verificarMenuAtivo(origem) {
     // Set the effect type
        var effect = "slide";
        // Set the options for the effect type chosen
        var options = {direction: 'left'};

        // Set the duration (default: 400 milliseconds)
        var duration = 700;
        
        if(origem == 1) {
            $("#menu_opl").hide(effect, options, duration);
            $("#menu_esri").show(effect, options, duration);
        } else if(origem == 2) {
            $("#menu_esri").hide(effect, options, duration);
            $("#menu_opl").show(effect, options, duration);
        
        }
}